import Vue from 'vue'
import Vuex from 'vuex'
import state from './state'
import * as actions from './actions'
import * as getters from './getters'
import createLogger from 'vuex/dist/logger'
Vue.use(Vuex)

const debug = process.env.NODE_ENV !== 'production'

const store = new Vuex.Store({
	actions,
	state,
	getters,
	mutations: {
		increment(state) {
			state.count++;
		},
		setNavTid(state, tid) {
			state.Navtid = tid;
		},
		setCurTid(state,payload){
			//更新state.curTid
			state.curTid=payload.curTid;
		}
	},
	plugins: debug ? [createLogger()] : []
})
export default store